package com.lcm.fas.model;

/**
 * 描述文件或者文件夹的实体类
 * @author lcm专用版
 */
public class FileInfo extends BaseModel{
	private String fileName;//名称
	private String updateTime;//修改日期
	private String type;//文件类型
	private String size;//大小
	private String path;//文件的绝对路径（唯一地指定文件）
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getSize() {
		return size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	public FileInfo(String fileName, String updateTime, String type, String size, String path) {
		super();
		this.fileName = fileName;
		this.updateTime = updateTime;
		this.type = type;
		this.size = size;
		this.path = path;
	}
	
	/**
	 * 表格构建：根据列索引获取列值
	 */
	@Override
	public Object getValue(Integer columnNumber) {
    	switch (columnNumber) {
			case 0://文件/文件夹名
				return getFileName();
		    case 1://更新时间
		    	return getUpdateTime();
		    case 2://文件类型
		    	return getType();
	    	case 3://文件大小
	    		return getSize()==null?"":getSize();
	    	case 4://文件路径
	    		return getPath();
    		default:
    			return "";
    	}
	}
	@Override
	public String toString() {
		return "FileInfo [fileName=" + fileName + ", updateTime=" + updateTime + ", type=" + type + ", size=" + size
				+ ", path=" + path + "]";
	}
	
	
	
}
